package com.fxm.client;

import com.fxm.config.feign.SignFeignConfig;
import com.fxm.returns.RespEntity;
import com.fxm.returns.RespTable;
import com.fxm.vo.param.RewardParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author fxm
 * @version V1.0.0
 * @description: 签到统计 feign调用
 * @date 2021/02/22 20:14
 */
@FeignClient(name = "signFeignClient", url = "${manage.url}", configuration = SignFeignConfig.class)
public interface SignClient {

    /**
     * 签到总览列表
     * @param page
     * @param limit
     * @return
     */
    @GetMapping("/sign/list")
    RespTable signList(@RequestParam("page") Integer page,
                       @RequestParam("limit") Integer limit);

    /**
     * 搜索用户
     * @param page
     * @param limit
     * @param username
     * @return
     */
    @GetMapping("/sign/list")
    RespTable searchSign(@RequestParam("page") Integer page,
                         @RequestParam("limit") Integer limit,
                         @RequestParam("username") String username);

    /**
     * 签到奖励列表
     * @return
     */
    @GetMapping("/sign/reward")
    RespEntity rewardList();

    /**
     * 编辑签到奖励积分
     * @param rewardParam
     * @return
     */
    @PutMapping("/sign/update")
    RespEntity rewardUpdate(@RequestBody RewardParam rewardParam);


}
